﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Soft000.Common
{
    public  class CheckFileType
    {
        public static bool CheckImgFile(string strFile)
        {
            string[] arr={".jpg",".jpeg",".gif",".tif","tiff"};
            string strExt = "";
            int pos = strFile.LastIndexOf(".");
            if (pos != -1)
                strExt = strFile.Substring(pos, strFile.Length-pos);
            strExt=strExt.ToLower().Trim();
            foreach (string str in arr)
            {
                if (strExt == str)
                    return true;
            }
            return false;
        }
    }
}
